<?php 
/*
@admin 缓存处理函数
@time 2013-1-1
@author wangjian
*/
define("__CACHE__PATH_ROOT__", str_replace("\\","/",FCPATH));
if (! defined('BASEPATH')) {
	exit('Access Denied');
}
class Cache_common {
	function Cache_common(){
		//print_r($_REQUEST);
	
	}
	function clear_menu_cache(){		
		$path = $this->config->item('cache_path');
    	$cache_path = ($path == '') ? APPPATH.'cache/' : $path;
    	$uri =	$this->config->item('base_url').
				$this->config->item('index_page').
				"admin/index/menu";
				$cache_path .= md5($uri);
			
		if(file_exists(__CACHE__PATH_ROOT__."/".$cache_path)){
			if(is_really_writable(__CACHE__PATH_ROOT__."/".$cache_path)){
				@unlink(__CACHE__PATH_ROOT__."/".$cache_path);
			}
		}
		
	}
}	
?>